package com.weimengchao.mybatisplus.tool;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weimengchao.core.http.PageRequest;

/**
 * @description: 分页工具
 * @author: 魏孟超
 * @createDate: 2021-10-15 20:18
 */
public class PageTool {

    /**
     * @description: 分页
     * @createAuthor: 魏孟超
     * @createDate: 2021/10/15 20:21
     * @params:
     * @return:
     */
    public static Page page(PageRequest pageRequest) {
        Page page = new Page<>(pageRequest.getPageNo(), pageRequest.getPageSize());
        return page;
    }
}
